#pragma once

#include "AbstractEntity.h"
#include "ItemData.h"
#include "ItemPhysics.h"
#include "ItemEffectivePhysics.h"

class ItemEntity : public AbstractEntity {
protected:
	bool isStatic;
	ItemData* _data;
	ItemPhysics* _currentPhysics;
	ItemPhysics* _physics;
	ItemEffectivePhysics* _effectivePhysics;

	void _checkActive();

	void _checkState();
public:
	ItemEntity(int id, int itemType, double x, double y, Rect* targetRect);

	virtual void update(long time);

	virtual void draw(long time);

	virtual AbstractData* getAbstractData();

	virtual ItemData* getItemData();

	virtual void initData();	

	virtual void updateData(int action, int action_data);
};